{% extends 'base.html' %}
{% load staticfiles %}
{% load blog_tags %}

{% block main %}
<!--header end-->
<div id="mainbody">
  <div class="banner-bottom">
    <p>Django 博客 系列</p>
  </div>
  <!--info end-->
  <div class="blogs">
    <ul class="bloglist">
       {% for post in posts %}
        <li>
          <div class="arrow_box">
            <div class="ti"></div>
            <!--三角形-->
            <div class="ci"></div>
            <!--圆形-->
            <h2 class="title"><a href="{{ post.get_absolute_url }}" target="_blank">{{ post.title }}</a></h2>
            <ul class="textinfo">
              <a href="/"><img src="{% static 'blog/images/s1.jpg' %}"></a>
              <p> {{ post.excerpt }} </p>
            </ul>
            <ul class="details">
              <li class="likes"><a href="#">10</a></li>
              <li class="comments"><a href="#">34</a></li>
              <li class="icon-time"><a href="#">{{ post.created_time }}</a></li>
            </ul>
          </div>
          <!--arrow_box end-->
        </li>
        {% empty %}
          <li>
              <div class="no-post">暂时还没有发布的文章！</div>
          </li>
        {% endfor %}
    </ul>
    <div class="page-wrap-box">
        <ul class="page-list">
          <li class="thisclass"><a href="#">1</a></li>
          <li class="thisclass"><a href="#">2</a></li>
          <li class="thisclass"><a href="#">3</a></li>
          <li class="thisclass"><a href="#">4</a></li>
          <li class="thisclass"><a href="#">5</a></li>
          <li class="thisclass"><a href="#">6</a></li>
          <li class="thisclass"><a href="#">下一页</a></li>
        </ul>
    </div>
    <!--bloglist end-->
  {% endblock main %}
{% block toc %}
      <div class="search">
        <form class="searchform" method="get" action="#">
          <input type="text" name="s" value="Search" onfocus="this.value=''" onblur="this.value='Search'">
        </form>
      </div>
      <div class="sunnav">
        <ul>
          <li><a href="/" target="_blank" title="网站首页"> 网站首页</a></li>
          <li><a href="/cate/2" target="_blank" title="学无止境">学无止境</a></li>
          <li><a href="/cate/1" target="_blank" title="人生杂谈">人生杂谈</a></li>
          <li><a href="#" target="_blank" title="留言板">留言板</a></li>
        </ul>
      </div>
      <div class="tuijian">
        <h2>博客更新</h2>
          {% get_next_posts as next_post_list %}
        <ol>
            {% for post in next_post_list %}
              <li><span><strong>{{ post.category }}</strong></span><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></li>
            {% empty %}
                <span>暂无文章</span>
            {% endfor %}
        </ol>
      </div>
      <div class="toppic">
        <h2>图文并茂</h2>
        <ul>
          <li><a href="/"><img src="images/k01.jpg">腐女不可怕，就怕腐女会画画！
            <p>伤不起</p>
            </a></li>
          <li><a href="/"><img src="images/k02.jpg">问前任，你还爱我吗？无限戳中泪点~
            <p>感兴趣</p>
            </a></li>
          <li><a href="/"><img src="images/k03.jpg">世上所谓幸福，就是一个笨蛋遇到一个傻瓜。
            <p>喜欢</p>
            </a></li>
        </ul>
      </div>
        <div class="clicks">
        <h2>热门点击</h2>
        {% get_hots_posts as hots_post_list %}
        <ol>
          {% for post in hots_post_list %}
          <li><span><a href="/">{{ post.category }}</a></span><a href="{{ post.get_absolute_url }}">{{ post.title }}</a></li>
          {% empty %}
              <span> 暂无文章 </span>
          {% endfor %}
        </ol>
      </div>
 {% endblock toc %}